/*
 *  SyncIT , easy synchronization of files between computers and devices.
 *  Copyright (C) 2011  Christian Masus <cmasus(at)gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version. If redistributing and/or modifying
 *  this file, this notice must be included in the redistributed or
 *  modified copy.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package gui;

import gui.debug.DebugGui;
import gui.javagui.JavaGui;
import config.ConfigInterface;
import controller.ControllerInterface;

/**
 * General interface for interacting with the GUI.
 * @author Christian Masus
 *
 */
public class Gui implements GuiInterface {

	private ControllerInterface controller;
	private GuiInterface guiType;

	public Gui(ControllerInterface controller) {
		this.controller = controller;
		ConfigInterface config = controller.getConfig();
		String guiInterface = config.getVariableString("", "GuiType");
		if(guiInterface.equals("JavaGui")) {
			guiType = new JavaGui(controller);
		}
		else if(guiInterface.equals("JavaGuiNative")) {
			guiType = new JavaGui(controller);
		}
		else if(guiInterface.equals("Debug")) {
			guiType = new DebugGui(controller);
		}
		else if(guiInterface.equals("Text")) {
			//guiType = new TextGui(controller);
		}
		else if(guiInterface.equals("WebGui")) {
			//guiType = new WebGui(controller);
		}
		else { // Run default GUI
			guiType = new JavaGui(controller);
		}
	}


}
